<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2025-02-28
  Time: 14:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form method="post" action="update" onsubmit="return validateForm()">
    <table>
        <tr>
            <td><input type="hidden" name="id" value="${sysUser.id}"></td>
        </tr>
        <tr>
            <td>账号：</td>
            <td><input type="text" name="account" value="${sysUser.account}"></td>
        </tr>
        <tr>
            <td>真实姓名：</td>
            <td><input type="text" name="realName" value="${sysUser.realName}"></td>
        </tr>
        <tr>
            <td>手机号码：</td>
            <td><input type="text" name="phone" value="${sysUser.phone}"></td>
        </tr>
        <tr>
            <td>地址：</td>
            <td><input type="text" name="address" value="${sysUser.address}"></td>
        </tr>
        <tr>
            <td><input type="submit" value="提交修改"></td>
        </tr>
    </table>
</form>
</body>
<script>
    function validateForm() {
        var account = document.forms[0]["account"].value;
        var phone = document.forms[0]["phone"].value;
        if (account === "") {
            alert("账号不能为空");
            return false;
        }
        if (phone === "") {
            alert("手机号码不能为空");
            return false;
        }
        return true;
    }
</script>
</html>
